package generic;

public class GenericDemo2 {
    public static void main(String[] args) {
        Inter1<String>i = new Inter1<>();
        i.show("张三");


        Inter2 i1 = new Inter2();
        i1.show(1);


    }
}


interface Inter<T> {
    void show(T t);
}

class Inter2 implements  Inter<Integer>{
    @Override
    public void show(Integer integer) {
        System.out.println(integer);
    }
}



class Inter1<T> implements Inter<T> {
    @Override
    public void show(T t) {
        System.out.println(t);
    }
}